<?php
$appid = '1065398803';

function idfa_find($channel, $idfa_array, $dbhost,$dbaccount,$dbpwd)
{
    $conn=mysql_connect($dbhost,$dbaccount,$dbpwd);
    mysql_select_db("shouhuzhemen_account");

    $ret_data = array();
    foreach($idfa_array as $key => $value)
    {
        $query = "SELECT * FROM device_lan WHERE idfa = '" . $value . "'";
        $result_db = mysql_query($query);

        if(true == mysql_fetch_array($result_db))
        {
            $ret_data[$value] = "1";
        }
        else
        {
            $ret_data[$value] = "0";
        }
    }

    return $ret_data;
}

?>
